(function(factory){var registeredInModuleLoader=false;if(typeof define==='function'&&define.amd){define(factory);registeredInModuleLoader=true}if(typeof exports==='object'){module.exports=factory();registeredInModuleLoader=true}if(!registeredInModuleLoader){var OldCookies=window.Cookies;var api=window.Cookies=factory();api.noConflict=function(){window.Cookies=OldCookies;return api}}}(function(){function extend(){var i=0;var result={};for(;i1){attributes=extend({path:'/'},api.defaults,attributes);if(typeof attributes.expires==='number'){var expires=new Date();expires.setMilliseconds(expires.getMilliseconds()+attributes.expires*864e+5);attributes.expires=expires}attributes.expires=attributes.expires?attributes.expires.toUTCString():'';try{result=JSON.stringify(value);if(/^[\{\[]/.test(result)){value=result}}catch(e){}if(!converter.write){value=encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)}else{value=converter.write(value,key)}key=encodeURIComponent(String(key));key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);key=key.replace(/[\(\)]/g,escape);var stringifiedAttributes='';for(var attributeName in attributes){if(!attributes[attributeName]){continue}stringifiedAttributes+='; '+attributeName;if(attributes[attributeName]===true){continue}stringifiedAttributes+='='+attributes[attributeName]}return(document.cookie=key+'='+value+stringifiedAttributes)}if(!key){result={}}var cookies=document.cookie?document.cookie.split('; '):[];var rdecode=/(%[0-9A-Z]{2})+/g;var i=0;for(;i');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\n/g,"
")+".
.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})}; var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("
").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("
").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var f=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),u=wpdiscuzAjaxObj.storeCommenterData,h=parseInt(wpdiscuzAjaxObj.wmuEnabled),b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.enableBubble),z=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),x=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),_=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,O=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),E=wpdiscuzAjaxObj.bubbleLocation,T=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,I=[],L=[],M=[],R=!1,F=1,j=e("html").css("scroll-behavior"),S=e("body").css("scroll-behavior");if(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),window.addEventListener("beforeunload",function(t){var o=e(".wpd-form").not(":hidden");if(o.length){if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap")){for(var a=0;a");o.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),o.trigger("select"),document.execCommand ("copy"),o.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"
"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e("body").on("click",".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit",function(e){e.preventDefault()}),e("body").on("click",".wpd-toggle.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked");var o,a,n,d,i=Y(e(this),0),s=e(this),c=e(".fas",s);!s.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&v?(o=i,a=t,n=J(o),d=new FormData,d.append("action","wpdShowReplies"),d.append("commentId",n),eh(C,!0,d).done(function(t){a.addClass("wpd_not_clicked"),"object"==typeof t&&t.success&&(e("#wpd-comm-"+o).replaceWith(t.data.comment_list),e("#wpd-comm-"+o+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+o+" .wpd-toggle .wpd-view-replies .wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+o+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),eu(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})):e("#wpd-comm-"+i+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(c.removeClass("fa-chevron-up"),c.addClass("fa-chevron-down"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_show_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(c.removeClass("fa-chevron-down"),c.addClass("fa-chevron-up"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e("body").on("mouseenter",".wpd-new-loaded-comment",function(){e(this).removeClass("wpd-new-loaded-comment")}),e("body").on("click",".wpd-sbs-toggle",function(){e(".wpdiscuz-subscribe-bar").slideToggle(y)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!o&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&e("#wpdiscuz-subscribe-form").length&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),et(e(this),""),t.preventDefault())})):"3.0"===d&&e("body").on("click","#wpdiscuz_subscription_button",function(t){var o=e(this).parents("#wpdiscuz-subscribe-form");et(o,""),t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,o.trigger("submit")},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}})),(a||n)&&"2.0"===d){var H=e(window).width(),P=e("#wpdcom").width();P>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),P>=940&&P<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),P>=810&&P<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),P>=730&&P<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),P>=610&&P<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),H>650&&(P>=510&&P<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),P>=470&&P<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),P<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function q(t,o,a){eh(C||h,!1,o).done(function(o){if(e(a).addClass("wpd_not_clicked"),"object"==typeof o){if(o.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(y),o.data.wc_all_comments_count_new=parseInt(o.data.wc_all_comments_count_new),e(".wpd-thread-info").html(o.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",o.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(o.data.wc_all_comments_count_bubble_html);var n,d,i,s,c=y;o.data.is_main?en(o.data.message):(c=y+700,e("#wpd-secondary-form-wrapper-"+o.data.uniqueid).slideToggle(700),1==o.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+o.data.uniqueid).after(o.data.message):e("#wpd-comm-"+o.data.uniqueid).after(o.data.message)),function e(t){if(!t.data.held_moderate){var o=new FormData;o.append("action","wpdCheckNotificationType"),o.append("comment_id",t.data.new_comment_id),o.append("email",t.data.comment_author_email),o.append("isParent",t.data.is_main),eh(C,!0,o)}}(o),function e(t){if(t.data.redirect>0&&t.data.new_comment_id){var o=new FormData;o.append("action","wpdRedirect"),o.append("commentId",t.data.new_comment_id),eh(C,!0,o).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,o){console.log(o)})}}(o),b&&g?(n=o.data,d=n.comment_author_email,i=n.comment_author,s=n.comment_author_url,null==u?(Cookies.set("comment_author_email_"+$,d),Cookies.set("comment_author_"+$,i),s.length&&Cookies.set("comment_author_url_"+$,s)):(u=parseInt(u),Cookies.set("comment_author_email_"+$,d,{expires:u,path:"/"}),Cookies.set("comment_author_"+$,i,{expires:u,path:"/"}),s.length&&Cookies.set("comment_author_url_"+$,s,{expires:u,path:"/"})),e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").prop("checked",!0)):g||e(".wpd-cookies-checkbox").prop("checked",!1),t.get(0).reset(),wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]):ef(t.find(".wc_comment")),U(o.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){eo(),e("html, body").animate({scrollTop:e("#comment-"+o.data.new_comment_id).offset().top-D},1e3,ea)},c),eu(o,t)}else o.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"),eu(o,t))}else wpdiscuzAjaxObj.setCommentMessage(o,"error");e("#wpdiscuz-loading-bar").fadeOut(250),R=!1}).fail(function(t,o,n){console.log(n),e(a).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function U(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&0>t.comment_author_email.indexOf("@example.com")&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function A(t,o){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(o),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e("body").on("click",".wc_comm_submit.wpd_not_clicked",function(){var t=e(this),i=1,s=e(this).parents("form");if("true"===s.attr("data-uploading")){wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseDoingUpload,"wmuPhraseDoingUpload",s),"warning");return}if(s.hasClass("wpd_main_comm_form")||(i=(c=e(this).parents(".wpd-comment"),r=c.attr("class").split(" "),p="",e.each(r,function(e,t){"wpd_comment_level"===Q(t,!1)&&(p=Q(t,!0))}),parseInt(p)+1)),et(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.on("submit",function(e){e.preventDefault()}),s[0].checkValidity()&&(l=s,m=!0,"2.0"===d&&e("input[name=wc_captcha]",l).length&&!e("input[name=wc_captcha]",l).val().length?(m=!1,e(".wpdiscuz-recaptcha",l).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",l).length&&e(".wpdiscuz-recaptcha",l).css("border","none"),m)){R=!0,function t(o){e(".wpd-agreement-checkbox",o).each(function(){e(this).hasClass("wpd_agreement_hide")&&b&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+$,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var c,r,p,l,m,w=new FormData;if(w.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&w.append(this.name+"",e(this).val().trim()),("checkbox"==this.type||"radio"==this.type)&&e(this).is(":checked")&&w.append(this.name+"",e(this).val())}),w.append("wpd_comment_depth",i),wpdiscuzAjaxObj.wpdiscuz_zs&&w.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length?e(".wpd-cookies-checkbox",s).prop("checked")||(g=!1):o&&(g=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){w.append("g-recaptcha-response",e),q(s,w,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(f){console.log(f),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+f.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else q(s,w,t)}(function e(t){if((a||n)&&"2.0"===d){var o=J(t);grecaptcha.reset(L[o])}})(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}),e("body").on("click",".wpd_editable_comment",function(){t&&e(".wpdiscuz-edit-form-wrap").length&&A(Y(e(".wpdiscuz-edit-form-wrap"),0),t);var o=e(this),a=Y(o,0),n=J(a),d=new FormData;d.append("action","wpdEditComment"),d.append("commentId",n),t=e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-text").get(0),eh(C,!0,d).done(function(t){if("object"==typeof t){if(t.success){if(e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(t.data.html),wpdiscuzLoadRichEditor){var n=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+a);n.clipboard.dangerouslyPasteHTML(0,t.data.content),n.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+a).val(t.data.content),ef(e("#wc-textarea-edit_"+a));e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else console.log(t);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wc_save_edited_comment",function(){var t=e(this),o=Y(t),a=J(o),n=e("#wpd-comm-"+o+" #wpdiscuz-edit-form");if(et(n,"#wpd-editor-edit_"+o),n.on("submit",function(e){e.preventDefault()}),n[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",n).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),("checkbox"===this.type||"radio"===this.type)&&e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),eh(C,!0,d).done(function(n){"object"==typeof n?(n.success?(A(o,n.data.message),n.data.comment_approved_html&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-subheader").append(n.data.comment_approved_html),n.data.lastEdited&&(e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(n.data.lastEdited).insertAfter("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),n.data.twitterShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",n.data.twitterShareLink),n.data.whatsappShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",n.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),eu(n,a)):wpdiscuzAjaxObj.setCommentMessage(n,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wc_cancel_edit",function(){var o=Y(e(this));A(o,t),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)}),!f&&w&&(F=0,1==w?setTimeout(function(){V(!0)},500):e("body").on("click",".wpd-load-comments",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),V(!0)})),e("body").on("click",".wpd-load-more-submit",function(){var t=e(this),o="wpd-loaded";t.hasClass(o)&&V(!1,t,o,"wpd-loading")});var W=!1;function B(){var t=document.getElementById("wpdiscuzHasMoreComments"),o=0;t&&(o=t.dataset.is_show_load_more);var a=document.getElementById("wpdcom")?document.getElementById("wpdcom").clientHeight:0,n=e(window).height()+e(window).scrollTop();a&&n&&100*n/a>=80&&!1===W&&1==o&&(W=!0,V(!1,e(".wpd-load-more-submit")))}function V(t,o,a,n){o&&(o.toggleClass(a),o.toggleClass(n));var d=new FormData;d.append("action","wpdLoadMoreComments");var s=e(".wpdiscuz-sort-button-active").attr("data-sorting");s&&d.append("sorting",s),d.append("offset",F),d.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),d.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");d.append("wpdType",c||""),eh(C,!t||1!=w,d).done(function(d){"object"==typeof d&&d.success&&(F++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(d.data.comment_list),K(d,t&&2!==i),W=!1,d.data.loadLastCommentId&&(l=d.data.loadLastCommentId),eu(d),t&&N(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))}).fail(function(t,d,i){console.log(i),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))})}function K(t,o){var a,n=document.getElementById("wpdiscuzHasMoreComments");if(!1==t.data.is_show_load_more)n&&(n.dataset.is_show_load_more=0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();else{if(a=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",a),2!==i&&e(".wpdiscuz-comment-pagination").show(),n&&(n.dataset.is_show_load_more=1),o&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show(),t.data.comments_left>0){if(!e(".wpd-load-more-submit .wpd-comments-left").length){let d=e("");d.addClass("wpd-comments-left"),e(".wpd-load-more-submit").append(d)}e(".wpd-load-more-submit .wpd-comments-left").text(t.data.comments_left_text)}}eu(t)}function N(t){var o=location.href.match(/#comment\-(\d+)/);if(null!==o){var a=o[1];if(e("#comment-"+a).length)setTimeout(function(){eo(),e("html, body").animate({scrollTop:e("#comment-"+a).parents("[id^=wpd-comm-]").offset().top-D},1e3,ea),t&&G(a)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",a),eh(C,!0,n).done(function(o){"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),eu(o),eo(),e("html, body").animate({scrollTop:e("#comment-"+a).offset().top-D},1e3,ea),t&&G(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function G(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function X(e){if(void 0!==e.data.message)for(var t,o=e.data.message,a=0;a.ql-editor").html()),function e(t){if("wpdiscuz-subscribe-form"!=t.attr("id")){var o=t.find(".wc_comment"),a=o.val().trim().replace(/


<\/p>/g,"\n").replace(/

(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/]*>/g," $3 ")).replace(/]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),o.val(a)}}(t),e.each(a,function(){e("input",this).prop("required",!1),0===e("input:checked",this).length?e("input",e(this)).prop("required",!0):e(".wpd-field-invalid",this).remove()})}function eo(){e("html, body").css("scroll-behavior","unset")}function ea(){e("html").css("scroll-behavior",j),e("body").css("scroll-behavior",S)}function en(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function ed(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,o){var a=e(o);a.prop("required")||(a.val()?a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==i||f||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),B(),e(window).scroll(function(){B()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",function(){var t,o=e(this);e(o).removeClass("wpd_not_clicked");var a=Y(o),n=J(a);t=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",n),d.append("voteType",t),eh(C,!0,d).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a){if(a.success){if("total"===a.data.buttonsStyle){var d=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result"),i=a.data.votes;d.text(a.data.votesHumanReadable),d.attr("title",i),d.removeClass("wpd-up wpd-down"),i>0&&d.addClass("wpd-up"),i<0&&d.addClass("wpd-down")}else{var s=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-like"),c=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-dislike");s.text(a.data.likeCountHumanReadable),s.attr("title",a.data.likeCount),c.text(a.data.dislikeCountHumanReadable),c.attr("title",a.data.dislikeCount),parseInt(a.data.likeCount)>0?s.addClass("wpd-up"):s.removeClass("wpd-up"),0>parseInt(a.data.dislikeCount)?c.addClass("wpd-down"):c.removeClass("wpd-down")}var r=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-up"),p=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-down");r.removeClass("wpd-up"),p.removeClass("wpd-down"),a.data.curUserReaction>0?r.addClass("wpd-up"):a.data.curUserReaction<0&&p.addClass("wpd-down")}else a.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,o),"error");eu(a,n,t)}else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).on("click","body",function(t){var o=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?o.css({display:o.is(":visible")?"none":"flex"}):o.hide()}),e("body").on("click",".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)",function(){var t=e(this),o=e(this).attr("data-sorting");if(o){e(".wpd-load-comments").parents(".wpd-load-more-submit-wrap").remove(),e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var a=new FormData;a.append("action","wpdSorting"),a.append("sorting",o);var n=e(".wpdf-active").attr("data-filter-type");a.append("wpdType",n||""),eh(C,!0,a).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),F=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){N(!1)},1!=w&&N(!1),e("body").on("click",".wpdiscuz-readmore",function(){var t=Y(e(this)),o=J(t),a=new FormData;a.append("action","wpdReadMore"),a.append("commentId",o),eh(C,!0,a).done(function(a){"object"==typeof a?(a.success?(e("#comment-"+o+" .wpd-comment-text").replaceWith(" "+a.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(a.data),eu(a)):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("change",".wpd-required-group",function(){0!==e("input:checked",this).length?e("input",e(this)).prop("required",!1):e("input",e(this)).prop("required",!0)}),e("body").on("click",".wpdiscuz-spoiler",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e("body").on("click",".wpd-tools",function(){var t=e(".wpd-tools-actions",e(this));t.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e("body").on("mouseleave",".wpd-comment-right",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e("body").on("click",".wpd_stick_btn",function(){var t=Y(e(this),0),o=J(t),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",o),eh(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd_close_btn",function(){var t=Y(e(this),0),o=J(t),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",o),eh(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-filter.wpd_not_clicked[data-filter-type]",function(){var t=e(this),o=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+o),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdLoadMoreComments");var n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&a.append("sorting",n),a.append("lastParentId",0),a.append("offset",0),F=1,a.append("wpdType",t.hasClass("wpdf-active")?"":o),a.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),eh(C,!1,a).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(o.data.comment_list),K(o),l=o.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),eu(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpdf-reacted.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdMostReactedComment"),eh(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e("#comment-"+o.data.commentId).length||e(".wpd-thread-list").prepend(o.data.message),eu(o),eo(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,ea))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpdf-hottest.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdHottestThread"),eh(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.commentId).length?e("#comment-"+o.data.commentId).parents("[id^=wpd-comm-"+o.data.commentId+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),eu(o),eo(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,ea))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpd-filter-view-all",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-follow-link.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=Y(t,0),a=J(o),n=new FormData;n.append("action","wpdFollowUser"),n.append("commentId",a),eh(C,!0,n).done(function(o){t.addClass("wpd_not_clicked"),"object"==typeof o?o.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data.code],o.data.code,t),"success"),t.removeClass("wpd-follow-active"),o.data.followTip&&t.attr("wpd-tooltip",o.data.followTip),o.data.followClass&&t.addClass(o.data.followClass),eu(o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),ed(),e("body").on("keyup",".wc_email",function(){ed(e(this))}),k&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),x&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover");let t=wpdiscuzAjaxObj.bubbleHintShowOnce?"/":location.href;wpdiscuzAjaxObj.bubbleHintCookieExpires&&parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),path:t}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*_)},1e3*x),"content_left"===E){if(e(".entry-content").length){var ei=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120,es=ei>25?ei:25;e("#wpd-bubble-wrapper").css({left:es+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){var ei=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120,es=ei>25?ei:25;e("#wpd-bubble-wrapper").css({left:es+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ei=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120,es=ei>25?ei:25;e("#wpd-bubble-wrapper").css({left:es+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")}else"left_corner"===E?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===E&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("body").on("click","#wpd-bubble-add-message-close",function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("body").on("click","#wpd-bubble",function(){eo(),e("#tab-title-reviews").length&&e("#tab-title-reviews a").trigger("click"),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-(D+28)},1e3,function(){ea(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").trigger("focus")})}),e("body").on("click","#wpd-bubble-comment-close",function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("body").on("click","#wpd-bubble-comment-reply-link a",function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),N(!0);var o=t.match(/#comment\-(\d+)/);M=M.filter(function(e){return e!=o[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(M.length),0==M.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("body").on("click","#wpd-bubble-count",function(){if(M.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",M.join()),eh(C,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),X(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),M=[],e(".wpd-new-loaded-comment").length&&(eo(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-(D+28)},1e3,ea)),eu(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,o){console.log(o)})}})}function ec(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:m,visibleCommentIds:ee()}}).done(function(t){if(!R){if("object"==typeof t){if(t.commentIDsToRemove.forEach(function(t){e("[id^=wpd-comm-"+t+"]").remove()}),t.ids.length){if(c){var o;(o=new FormData).append("action","wpdUpdateAutomatically"),o.append("loadLastCommentId",l),o.append("visibleCommentIds",ee()),eh(C,!1,o).done(function(t){!R&&"object"==typeof t&&t.success&&(X(t),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e(".wpd-thread-info").html(t.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(t.data.wc_all_comments_count_bubble_html),l=t.data.loadLastCommentId)}).fail(function(e,t,o){console.log(o)})}t.ids=t.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var a=5e3;m=parseInt(t.ids[t.ids.length-1]),M=M.concat(t.ids),O&&t.commentText&&(e("#wpd-bubble-author-avatar").html(t.avatar),e("#wpd-bubble-author-name").html(t.authorName),e("#wpd-bubble-comment-date span").html(t.commentDate),e("#wpd-bubble-comment-text").html(t.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",t.commentLink),e("#wpd-bubble-notification-message").show(),a=1e4);var n=parseInt(e(".wpd-new-comments-count").text());n+=t.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},a),e(".wpd-new-comments-count").text(n),e("#wpd-bubble-count").addClass("wpd-new-comments")}t.all_comments_count=parseInt(t.all_comments_count),e("#wpd-bubble-all-comments-count").replaceWith(t.all_comments_count_bubble_html),e(".wpd-reviews-tab").length||(e(".wpd-thread-info").html(t.all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.all_comments_count))}else console.log(t)}setTimeout(ec,r)}).fail(function(e,t,o){console.log(o),setTimeout(ec,r)})}if((k&&z||c)&&(o||!o&&p)&&setTimeout(ec,r),e(".wpd-inline-form-wrapper").length){var er=new FormData;er.append("action","wpdGetInlineCommentForm"),eh(C,!1,er).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),o=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+o.substring(o.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),ew()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data]),t.data,"error"):console.log(t)}).fail(function(e,t,o){console.log(o)})}function ep(t){if(e(t).hasClass("wpd-inline-shortcode"))var o=e(t).attr("id");else var o=e(t).parents(".wpd-inline-shortcode").attr("id");return o.substring(o.lastIndexOf("-")+1)}function el(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function em(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),o=t.offset().top-window.pageYOffset;t.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&o>0&&o<300&&("blink"===T?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),ew(t.siblings(".wpd-inline-form-wrapper"))))})}function ew(t){if(t){if(t.offset().left<=10){t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o<3&&(o=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}else if(t.offset().left+t.width()>document.body.clientWidth-10){t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o>t.width()-3&&(o=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ef(t){var o,a=0;if(t.parents(".wpd_main_comm_form").length)a=parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents(".wpd_main_comm_form");else if(t.parents(".wpd-secondary-form-wrapper").length)a=parseInt(wpdiscuzAjaxObj.replyTextMaxLength),o=t.parents(".wpd-secondary-form-wrapper");else if(t.parents("#wpdiscuz-edit-form").length){var n=Y(t);a=parseInt(n.substring(n.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents("#wpdiscuz-edit-form")}if(a&&o){var d=t.val().length,i=e(".wpd-editor-char-counter",o),s=a-d;i.html(s),s<=10?i.addClass("error"):i.removeClass("error")}}function eu(t,o,a,n){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,o,a,n):"function"==typeof window[t.data.callbackFunctions[e]]?window[t.data.callbackFunctions[e]](t,o,a,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function eh(t,o,a){o&&e("#wpdiscuz-loading-bar").show(),a.append("postId",s);var n=a.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(a=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](a,t,o))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:d,data:a,contentType:!1,processData:!1})}e(document).on("click","body",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){el();var o="";e(t.target).hasClass("wpd-inline-icon")?o=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(o=e(t.target).parents(".wpd-inline-icon")),o.length&&o.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&(o.parents(".wpd-inline-shortcode").addClass("wpd-active"),o.siblings(".wpd-inline-form-wrapper").show(),o.addClass("wpd-open"),o.removeClass("wpd-ignored"),ew(o.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e("body").on("click",".wpd-inline-submit.wpd_not_clicked",function(t){t.preventDefault();var o=e(this),a=e(this).parents(".wpd_inline_comm_form");if(a[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ep(a)),e.each(e("input, textarea",a),function(t,o){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(o).attr("name"),e(o).val()):n.append(e(o).attr("name"),e(o).val())}),eh(C,!0,n).done(function(t){if(o.addClass("wpd_not_clicked"),"object"==typeof t){if(t.success){a[0].reset(),el();var n=parseInt(t.data.newCount),d=o.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.removeClass("wpd-has-comments"),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e(".wpd-thread-info").html(t.data.allCommentsCountBeforeThreadsHtml),e(".wpd-thread-info").attr("data-comments-count",t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").replaceWith(t.data.allCommentsCountBubbleHtml),t.data.message&&en(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("keydown",".wpd-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e("body").on("keydown","#wpdiscuz-edit-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e("body").on("keydown",".wpd-inline-comment-content",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-inline-icon-count.wpd-has-comments",function(){var t=e(this),o=new FormData;o.append("action","wpdGetLastInlineComments"),o.append("inline_form_id",ep(t)),eh(C,!0,o).done(function(o){"object"==typeof o?o.success?e(o.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-view-all-inline-comments",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),eo(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-D},1e3,ea)}),e("body").on("click",".wpd-feedback-content-link",function(t){t.preventDefault();var o=e(this).data("feedback-content-id");eo(),e("html, body").animate({scrollTop:e("#wpd-inline-"+o).offset().top-(D+6)},1e3,function(){ea(),e("#wpd-inline-"+o).addClass("wpd-active")})}),("scroll_open"===T||"blink"===T)&&(em(),e(window).on("scroll",em)),e("body").on("click","#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg",function(){var t=new FormData,o=e(this).index();o>=0&&o<5&&(t.append("action","wpdUserRate"),t.append("rating",o+1),eh(C,!0,t).done(function(t){"object"==typeof t?(t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data),"error"),eu(t)):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){t.preventDefault();var o=e(this);let a=e("#wpdiscuz_subscription_button",o);if(o[0].checkValidity()&&(n=o,i=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).val().length?(i=!1,e(".wpdiscuz-recaptcha",n).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&e(".wpdiscuz-recaptcha",n).css("border","none"),i)&&a.hasClass("wpd_not_clicked")){a.removeClass("wpd_not_clicked");var n,i,s=new FormData;s.append("action","wpdAddSubscription"),e("*",o).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),("checkbox"==this.type||"radio"==this.type)&&e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),eh(C,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),R=!1,a.addClass("wpd_not_clicked")}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wpd-unsubscribe",function(t){t.preventDefault();var o=new FormData;o.append("action","wpdUnsubscribe"),o.append("sid",e(this).data("sid")),o.append("skey",e(this).data("skey")),eh(C,!0,o).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),R=!1}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=eh});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}}; !function(t,e,i){var o,n,r,h,a,s,l,c,d,g,f,u,p,m,w,v,y,x,b,T,C,H,k,W,E,I,M,L,R,S,K,P,B,O={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),o=t(this).data("cbox-iframe-attrs");return"object"==typeof o&&t.each(o,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},_="colorbox",j="cbox",D=j+"Element",F=j+"_open",N=j+"_load",z=j+"_complete",A=j+"_cleanup",q=j+"_closed",U=j+"_purge",$=t(""),G="div",Q=0,J={};function V(i,o,n){var r=e.createElement(i);return o&&(r.id=j+o),n&&(r.style.cssText=n),t(r)}function X(){return i.innerHeight?i.innerHeight:t(i).height()}function Y(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var o;return void 0===this.cache[e]&&(void 0!==(o=t(this.el).attr("data-cbox-"+e))?this.cache[e]=o:void 0!==i[e]?this.cache[e]=i[e]:void 0!==O[e]&&(this.cache[e]=O[e])),this.cache[e]},this.get=function(t){var e=this.value(t);return"function"==typeof e?e.call(this.el,this):e}}function Z(t){var e=d.length,i=(I+t)%e;return i<0?e+i:i}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?g.width():X())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function it(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function ot(t){"contains"in n[0]&&!n[0].contains(t.target)&&t.target!==o[0]&&(t.stopPropagation(),n.trigger("focus"))}function nt(t){nt.str!==t&&(n.add(o).removeClass(nt.str).addClass(t),nt.str=t)}function rt(i){t(e).trigger(i),$.triggerHandler(i)}var ht=function(){var t,e,i=j+"Slideshow_",o="click."+j;function r(){clearTimeout(e)}function h(){(C.get("loop")||d[I+1])&&(r(),e=setTimeout(P.next,C.get("slideshowSpeed")))}function a(){v.html(C.get("slideshowStop")).off(o).one(o,s),$.on(z,h).on(N,r),n.removeClass(i+"off").addClass(i+"on")}function s(){r(),$.off(z,h).off(N,r),v.html(C.get("slideshowStart")).off(o).one(o,function(){P.next(),a()}),n.removeClass(i+"on").addClass(i+"off")}function l(){t=!1,v.hide(),r(),$.off(z,h).off(N,r),n.removeClass(i+"off "+i+"on")}return function(){t?C.get("slideshow")||($.off(A,l),l()):C.get("slideshow")&&d[1]&&(t=!0,$.one(A,l),C.get("slideshowAuto")?a():s(),v.show())}}();function at(r){var g,w;if(!S){if(g=t(r).data(_),C=new Y(r,g),w=C.get("rel"),I=0,w&&!1!==w&&"nofollow"!==w?(d=t("."+D).filter(function(){return new Y(this,t.data(this,_)).get("rel")===w}),-1===(I=d.index(C.el))&&(d=d.add(C.el),I=d.length-1)):d=t(C.el),!L){L=R=!0,nt(C.get("className")),n.css({visibility:"hidden",display:"block",opacity:""}),f=V(G,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),h.css({width:"",height:""}).append(f),H=a.height()+c.height()+h.outerHeight(!0)-h.height(),k=s.width()+l.width()+h.outerWidth(!0)-h.width(),W=f.outerHeight(!0),E=f.outerWidth(!0);var v=tt(C.get("initialWidth"),"x"),y=tt(C.get("initialHeight"),"y"),x=C.get("maxWidth"),B=C.get("maxHeight");C.w=Math.max((!1!==x?Math.min(v,tt(x,"x")):v)-E-k,0),C.h=Math.max((!1!==B?Math.min(y,tt(B,"y")):y)-W-H,0),f.css({width:"",height:C.h}),P.position(),rt(F),C.get("onOpen"),T.add(m).hide(),n.trigger("focus"),C.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",ot,!0),$.one(q,function(){e.removeEventListener("focus",ot,!0)})),C.get("returnFocus")&&$.one(q,function(){t(C.el).trigger("focus")})}var O=parseFloat(C.get("opacity"));o.css({opacity:O==O?O:"",cursor:C.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),C.get("closeButton")?b.html(C.get("close")).appendTo(h):b.appendTo("

"),function(){var e,o,n,r=P.prep,h=++Q;R=!0,M=!1,rt(U),rt(N),C.get("onLoad"),C.h=C.get("height")?tt(C.get("height"),"y")-W-H:C.get("innerHeight")&&tt(C.get("innerHeight"),"y"),C.w=C.get("width")?tt(C.get("width"),"x")-E-k:C.get("innerWidth")&&tt(C.get("innerWidth"),"x"),C.mw=C.w,C.mh=C.h,C.get("maxWidth")&&(C.mw=tt(C.get("maxWidth"),"x")-E-k,C.mw=C.w&&C.w").hide().insertBefore(a),$.one(U,function(){n.replaceWith(a)}),r(a)}else C.get("iframe")?r(" "):C.get("html")?r(C.get("html")):et(C,e)?(e=it(C,e),M=C.get("createImg"),t(M).addClass(j+"Photo").on("error."+j,function(){r(V(G,"Error").html(C.get("imgError")))}).one("load",function(){h===Q&&setTimeout(function(){var e;C.get("retinaImage")&&i.devicePixelRatio>1&&(M.height=M.height/i.devicePixelRatio,M.width=M.width/i.devicePixelRatio),C.get("scalePhotos")&&(o=function(){M.height-=M.height*e,M.width-=M.width*e},C.mw&&M.width>C.mw&&(e=(M.width-C.mw)/M.width,o()),C.mh&&M.height>C.mh&&(e=(M.height-C.mh)/M.height,o())),C.h&&(M.style.marginTop=Math.max(C.mh-M.height,0)/2+"px"),d[1]&&(C.get("loop")||d[I+1])&&(M.style.cursor="pointer",t(M).on("click."+j,function(){P.next()})),M.style.width=M.width+"px",M.style.height=M.height+"px",r(M)},1)}),M.src=e):e&&u.load(e,C.get("data"),function(e,i){h===Q&&r("error"===i?V(G,"Error").html(C.get("xhrError")):t(this).contents())})}()}}function st(){n||(B=!1,g=t(i),n=V(G).attr({id:_,class:!1===t.support.opacity?j+"IE":"",role:"dialog",tabindex:"-1"}).hide(),o=V(G,"Overlay").hide(),p=t([V(G,"LoadingOverlay")[0],V(G,"LoadingGraphic")[0]]),r=V(G,"Wrapper"),h=V(G,"Content").append(m=V(G,"Title"),w=V(G,"Current"),x=t('
'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t(''+i+''),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return'